package com.sjtucook;

import android.os.Parcel;
import android.os.Parcelable;

public class Dish implements Parcelable {
	private int id;
	private String name;
	private String material;
	private String description;
	private String image;
	private int rate;
	private int favorite;

	public static final Parcelable.Creator<Dish> CREATOR = new Creator<Dish>() {
		@Override
		public Dish createFromParcel(Parcel source) {
			Dish dish = new Dish();
			dish.setId(source.readInt());
			dish.setName(source.readString());
			dish.setMaterial(source.readString());
			dish.setDescription(source.readString());
			dish.setImage(source.readString());
			dish.setRate(source.readInt());
			dish.setFavorite(source.readInt());
			return dish;
		}

		@Override
		public Dish[] newArray(int size) {
			return new Dish[size];
		}
	};

	public static Parcelable.Creator<Dish> getCreator() {
		return CREATOR;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeInt(this.id);
		dest.writeString(this.name);
		dest.writeString(this.material);
		dest.writeString(this.description);
		dest.writeString(this.image);
		dest.writeInt(this.rate);
		dest.writeInt(this.favorite);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMaterial() {
		return material;
	}

	public void setMaterial(String material) {
		this.material = material;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public int getRate() {
		return rate;
	}

	public void setRate(int rate) {
		this.rate = rate;
	}

	public int getFavorite() {
		return favorite;
	}

	public void setFavorite(int favorite) {
		this.favorite = favorite;
	}

}
